package demo;

public class CC {
    public static void main(String[] args) {
    int[] arr1={10,20,30};
    int[] arr2={10,30,40};
        System.out.println(compare(arr1, arr2));
    }
    public static boolean compare(int[] arr1,int[] arr2)
    {
        if(arr1.length== arr2.length)
        {
            for (int i = 0; i <=arr1.length; i++) {
                if (arr1[i]!=arr2[1]) {
                    return false;
                }
            }
            return true;
        }
        else return false;

    }
}
